Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reuse cached layers to reduce build times #156

Closed
wants to merge 7 commits into from

Conversation

JessicaBarh
Copy link
Contributor

@JessicaBarh JessicaBarh commented Nov 23, 2020

Add layer caching to the CI to speed up deployment/testing. CI now does docker pull this_image:master prior to each docker build in order to pull the most recently built image in an attempt to get layers that docker build can cache from. If a perfect cache hit, each image builds in <5 min instead of 15-35 min. This also prevents rebuilding images unnecessarily (eg: if making a CPU-only change, the GPU images will just pull from cache rather than rebuild). In the worst case (editing base-notebook) this adds ~3-5min to build.

This Relates to PR #129 that is being split up into smaller PRs for review - for issue #146

@JessicaBarh JessicaBarh marked this pull request as ready for review November 23, 2020 21:57
@@ -4,15 +4,17 @@ set -e

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build_push.sh could be more general if we wanted. It could just take lists of

pull_before_build = [...]  # (for caching)
tag_output = [...] # (for applying arbitrary number of tags that then get pushed)

I was lazy before and didn't make lists, but might make it more reusable.

Copy link
Contributor

@ca-scribner ca-scribner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but should be reviewed by Blair or Brendan

@sylus sylus closed this Nov 27, 2020
@JessicaBarh JessicaBarh deleted the build-caching branch December 18, 2020 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants